// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0

// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// 	http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

//! Autogenerated weights for `pallet_election_provider_multi_block::verifier`
//!
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 32.0.0
//! DATE: 2025-11-13, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
//! WORST CASE MAP SIZE: `1000000`
//! HOSTNAME: `dc396778ddb0`, CPU: `Intel(R) Xeon(R) CPU @ 2.60GHz`
//! WASM-EXECUTION: `Compiled`, CHAIN: `None`, DB CACHE: 1024

// Executed Command:
// frame-omni-bencher
// v1
// benchmark
// pallet
// --extrinsic=*
// --runtime=target/production/wbuild/asset-hub-westend-runtime/asset_hub_westend_runtime.wasm
// --pallet=pallet_election_provider_multi_block::verifier
// --header=/__w/polkadot-sdk/polkadot-sdk/cumulus/file_header.txt
// --output=./cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights
// --wasm-execution=compiled
// --steps=50
// --repeat=20
// --heap-pages=4096
// --no-storage-info
// --no-min-squares
// --no-median-slopes

#![cfg_attr(rustfmt, rustfmt_skip)]
#![allow(unused_parens)]
#![allow(unused_imports)]
#![allow(missing_docs)]

use frame_support::{traits::Get, weights::Weight};
use core::marker::PhantomData;

/// Weight functions for `pallet_election_provider_multi_block::verifier`.
pub struct WeightInfo<T>(PhantomData<T>);
impl<T: frame_system::Config> pallet_election_provider_multi_block::verifier::WeightInfo for WeightInfo<T> {
	/// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:1)
	/// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`)
	/// Storage: `MultiBlockElectionVerifier::StatusStorage` (r:1 w:1)
	/// Proof: `MultiBlockElectionVerifier::StatusStorage` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`)
	/// Storage: `MultiBlockElection::Round` (r:1 w:0)
	/// Proof: `MultiBlockElection::Round` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::SortedScores` (r:1 w:0)
	/// Proof: `MultiBlockElectionSigned::SortedScores` (`max_values`: None, `max_size`: Some(653), added: 3128, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::SubmissionStorage` (r:1 w:0)
	/// Proof: `MultiBlockElectionSigned::SubmissionStorage` (`max_values`: None, `max_size`: Some(46478), added: 48953, mode: `Measured`)
	/// Storage: `MultiBlockElection::PagedTargetSnapshot` (r:1 w:0)
	/// Proof: `MultiBlockElection::PagedTargetSnapshot` (`max_values`: None, `max_size`: Some(32026), added: 34501, mode: `Measured`)
	/// Storage: `MultiBlockElection::PagedVoterSnapshot` (r:1 w:0)
	/// Proof: `MultiBlockElection::PagedVoterSnapshot` (`max_values`: None, `max_size`: Some(388785), added: 391260, mode: `Measured`)
	/// Storage: `MultiBlockElection::DesiredTargets` (r:1 w:0)
	/// Proof: `MultiBlockElection::DesiredTargets` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `Measured`)
	/// Storage: `MultiBlockElectionVerifier::QueuedValidVariant` (r:1 w:0)
	/// Proof: `MultiBlockElectionVerifier::QueuedValidVariant` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `Measured`)
	/// Storage: `MultiBlockElectionVerifier::QueuedSolutionX` (r:0 w:1)
	/// Proof: `MultiBlockElectionVerifier::QueuedSolutionX` (`max_values`: None, `max_size`: Some(33794026), added: 33796501, mode: `Measured`)
	/// Storage: `MultiBlockElectionVerifier::QueuedSolutionBackings` (r:0 w:1)
	/// Proof: `MultiBlockElectionVerifier::QueuedSolutionBackings` (`max_values`: None, `max_size`: Some(52026), added: 54501, mode: `Measured`)
	fn verification_valid_non_terminal() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `373126`
		//  Estimated: `376591`
		// Minimum execution time: 686_534_000 picoseconds.
		Weight::from_parts(743_184_000, 0)
			.saturating_add(Weight::from_parts(0, 376591))
			.saturating_add(T::DbWeight::get().reads(9))
			.saturating_add(T::DbWeight::get().writes(4))
	}
	/// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:1)
	/// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`)
	/// Storage: `MultiBlockElectionVerifier::StatusStorage` (r:1 w:1)
	/// Proof: `MultiBlockElectionVerifier::StatusStorage` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`)
	/// Storage: `MultiBlockElection::Round` (r:1 w:0)
	/// Proof: `MultiBlockElection::Round` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::SortedScores` (r:1 w:1)
	/// Proof: `MultiBlockElectionSigned::SortedScores` (`max_values`: None, `max_size`: Some(653), added: 3128, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::SubmissionStorage` (r:32 w:32)
	/// Proof: `MultiBlockElectionSigned::SubmissionStorage` (`max_values`: None, `max_size`: Some(46478), added: 48953, mode: `Measured`)
	/// Storage: `MultiBlockElection::PagedTargetSnapshot` (r:1 w:0)
	/// Proof: `MultiBlockElection::PagedTargetSnapshot` (`max_values`: None, `max_size`: Some(32026), added: 34501, mode: `Measured`)
	/// Storage: `MultiBlockElection::PagedVoterSnapshot` (r:1 w:0)
	/// Proof: `MultiBlockElection::PagedVoterSnapshot` (`max_values`: None, `max_size`: Some(388785), added: 391260, mode: `Measured`)
	/// Storage: `MultiBlockElection::DesiredTargets` (r:1 w:0)
	/// Proof: `MultiBlockElection::DesiredTargets` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `Measured`)
	/// Storage: `MultiBlockElectionVerifier::QueuedValidVariant` (r:1 w:1)
	/// Proof: `MultiBlockElectionVerifier::QueuedValidVariant` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `Measured`)
	/// Storage: `MultiBlockElectionVerifier::QueuedSolutionBackings` (r:33 w:32)
	/// Proof: `MultiBlockElectionVerifier::QueuedSolutionBackings` (`max_values`: None, `max_size`: Some(52026), added: 54501, mode: `Measured`)
	/// Storage: `MultiBlockElectionVerifier::QueuedSolutionScore` (r:1 w:1)
	/// Proof: `MultiBlockElectionVerifier::QueuedSolutionScore` (`max_values`: None, `max_size`: Some(60), added: 2535, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::SubmissionMetadataStorage` (r:1 w:1)
	/// Proof: `MultiBlockElectionSigned::SubmissionMetadataStorage` (`max_values`: None, `max_size`: Some(181), added: 2656, mode: `Measured`)
	/// Storage: `Balances::Holds` (r:1 w:1)
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(265), added: 2740, mode: `Measured`)
	/// Storage: `MultiBlockElectionVerifier::QueuedSolutionX` (r:0 w:1)
	/// Proof: `MultiBlockElectionVerifier::QueuedSolutionX` (`max_values`: None, `max_size`: Some(33794026), added: 33796501, mode: `Measured`)
	fn verification_valid_terminal() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `409681`
		//  Estimated: `492346`
		// Minimum execution time: 1_194_264_000 picoseconds.
		Weight::from_parts(1_276_313_000, 0)
			.saturating_add(Weight::from_parts(0, 492346))
			.saturating_add(T::DbWeight::get().reads(76))
			.saturating_add(T::DbWeight::get().writes(72))
	}
	/// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:1)
	/// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`)
	/// Storage: `MultiBlockElectionVerifier::StatusStorage` (r:1 w:1)
	/// Proof: `MultiBlockElectionVerifier::StatusStorage` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`)
	/// Storage: `MultiBlockElection::Round` (r:1 w:0)
	/// Proof: `MultiBlockElection::Round` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::SortedScores` (r:1 w:1)
	/// Proof: `MultiBlockElectionSigned::SortedScores` (`max_values`: None, `max_size`: Some(653), added: 3128, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::SubmissionStorage` (r:32 w:32)
	/// Proof: `MultiBlockElectionSigned::SubmissionStorage` (`max_values`: None, `max_size`: Some(46478), added: 48953, mode: `Measured`)
	/// Storage: `MultiBlockElection::PagedTargetSnapshot` (r:1 w:0)
	/// Proof: `MultiBlockElection::PagedTargetSnapshot` (`max_values`: None, `max_size`: Some(32026), added: 34501, mode: `Measured`)
	/// Storage: `MultiBlockElection::PagedVoterSnapshot` (r:1 w:0)
	/// Proof: `MultiBlockElection::PagedVoterSnapshot` (`max_values`: None, `max_size`: Some(388785), added: 391260, mode: `Measured`)
	/// Storage: `MultiBlockElection::DesiredTargets` (r:1 w:0)
	/// Proof: `MultiBlockElection::DesiredTargets` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `Measured`)
	/// Storage: `MultiBlockElectionVerifier::QueuedValidVariant` (r:1 w:0)
	/// Proof: `MultiBlockElectionVerifier::QueuedValidVariant` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `Measured`)
	/// Storage: `MultiBlockElectionVerifier::QueuedSolutionBackings` (r:33 w:32)
	/// Proof: `MultiBlockElectionVerifier::QueuedSolutionBackings` (`max_values`: None, `max_size`: Some(52026), added: 54501, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::SubmissionMetadataStorage` (r:1 w:1)
	/// Proof: `MultiBlockElectionSigned::SubmissionMetadataStorage` (`max_values`: None, `max_size`: Some(181), added: 2656, mode: `Measured`)
	/// Storage: `Balances::Holds` (r:1 w:1)
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(265), added: 2740, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::Invulnerables` (r:1 w:1)
	/// Proof: `MultiBlockElectionSigned::Invulnerables` (`max_values`: Some(1), `max_size`: Some(513), added: 1008, mode: `Measured`)
	/// Storage: `MultiBlockElectionVerifier::QueuedSolutionX` (r:31 w:32)
	/// Proof: `MultiBlockElectionVerifier::QueuedSolutionX` (`max_values`: None, `max_size`: Some(33794026), added: 33796501, mode: `Measured`)
	fn verification_invalid_terminal() -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `409681`
		//  Estimated: `492346`
		// Minimum execution time: 1_242_495_000 picoseconds.
		Weight::from_parts(1_320_314_000, 0)
			.saturating_add(Weight::from_parts(0, 492346))
			.saturating_add(T::DbWeight::get().reads(107))
			.saturating_add(T::DbWeight::get().writes(102))
	}
	/// Storage: `MultiBlockElection::CurrentPhase` (r:1 w:1)
	/// Proof: `MultiBlockElection::CurrentPhase` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`)
	/// Storage: `MultiBlockElectionVerifier::StatusStorage` (r:1 w:1)
	/// Proof: `MultiBlockElectionVerifier::StatusStorage` (`max_values`: Some(1), `max_size`: Some(5), added: 500, mode: `Measured`)
	/// Storage: `MultiBlockElection::Round` (r:1 w:0)
	/// Proof: `MultiBlockElection::Round` (`max_values`: Some(1), `max_size`: Some(4), added: 499, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::SortedScores` (r:1 w:1)
	/// Proof: `MultiBlockElectionSigned::SortedScores` (`max_values`: None, `max_size`: Some(653), added: 3128, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::SubmissionStorage` (r:32 w:32)
	/// Proof: `MultiBlockElectionSigned::SubmissionStorage` (`max_values`: None, `max_size`: Some(46478), added: 48953, mode: `Measured`)
	/// Storage: `MultiBlockElection::PagedTargetSnapshot` (r:1 w:0)
	/// Proof: `MultiBlockElection::PagedTargetSnapshot` (`max_values`: None, `max_size`: Some(32026), added: 34501, mode: `Measured`)
	/// Storage: `MultiBlockElection::PagedVoterSnapshot` (r:1 w:0)
	/// Proof: `MultiBlockElection::PagedVoterSnapshot` (`max_values`: None, `max_size`: Some(388785), added: 391260, mode: `Measured`)
	/// Storage: `MultiBlockElection::DesiredTargets` (r:1 w:0)
	/// Proof: `MultiBlockElection::DesiredTargets` (`max_values`: None, `max_size`: Some(16), added: 2491, mode: `Measured`)
	/// Storage: `MultiBlockElectionVerifier::QueuedValidVariant` (r:1 w:0)
	/// Proof: `MultiBlockElectionVerifier::QueuedValidVariant` (`max_values`: None, `max_size`: Some(13), added: 2488, mode: `Measured`)
	/// Storage: `MultiBlockElectionVerifier::QueuedSolutionX` (r:31 w:31)
	/// Proof: `MultiBlockElectionVerifier::QueuedSolutionX` (`max_values`: None, `max_size`: Some(33794026), added: 33796501, mode: `Measured`)
	/// Storage: `MultiBlockElectionVerifier::QueuedSolutionBackings` (r:31 w:31)
	/// Proof: `MultiBlockElectionVerifier::QueuedSolutionBackings` (`max_values`: None, `max_size`: Some(52026), added: 54501, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::SubmissionMetadataStorage` (r:1 w:1)
	/// Proof: `MultiBlockElectionSigned::SubmissionMetadataStorage` (`max_values`: None, `max_size`: Some(181), added: 2656, mode: `Measured`)
	/// Storage: `Balances::Holds` (r:1 w:1)
	/// Proof: `Balances::Holds` (`max_values`: None, `max_size`: Some(265), added: 2740, mode: `Measured`)
	/// Storage: `MultiBlockElectionSigned::Invulnerables` (r:1 w:1)
	/// Proof: `MultiBlockElectionSigned::Invulnerables` (`max_values`: Some(1), `max_size`: Some(513), added: 1008, mode: `Measured`)
	/// The range of component `v` is `[0, 31]`.
	fn verification_invalid_non_terminal(v: u32, ) -> Weight {
		// Proof Size summary in bytes:
		//  Measured:  `417092 + v * (37 ±0)`
		//  Estimated: `488244 + v * (2550 ±72)`
		// Minimum execution time: 866_408_000 picoseconds.
		Weight::from_parts(997_133_252, 0)
			.saturating_add(Weight::from_parts(0, 488244))
			// Standard Error: 143_927
			.saturating_add(Weight::from_parts(2_282_980, 0).saturating_mul(v.into()))
			.saturating_add(T::DbWeight::get().reads(43))
			.saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(v.into())))
			.saturating_add(T::DbWeight::get().writes(38))
			.saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(v.into())))
			.saturating_add(Weight::from_parts(0, 2550).saturating_mul(v.into()))
	}
}
